const PUBLIC_PATH = process.env.NODE_ENV === 'production' ? './' : '/'

const path = require('path')

const resolve = dir => path.join(__dirname, dir)

module.exports = {
  lintOnSave: false,
  publicPath: PUBLIC_PATH,
  chainWebpack: config => {
    config.resolve.alias.set('@', resolve('src')).set('_c', resolve('src/components/'))
  },
  productionSourceMap: false,
  devServer: {
    //proxy: 'https://tpshion.cn/api/',
    proxy: process.env.NODE_ENV === 'production' ? 'https://tpshion.cn/api/' : 'http://localhost:8079',
    port: 5000
  }
}
